package com.bdqn.Sj02;

import java.awt.*;

//彩色墨盒实现类
public class ColorInk implements Ink{
    /**
     * 打印彩色文字
     */
    @Override
    public String getColor(int red, int green, int blue) {
        Color color = new Color(red,green,blue);
        return "#"+Integer.toHexString(color.getRGB()).substring(2);
    }
}
